﻿<UserControl x:Class="DIST.LR.ZHJG.Controls.Chart.ucBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:mscorlib="clr-namespace:System;assembly=mscorlib"
    xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
    xmlns:charting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"
    HorizontalAlignment="Center" VerticalAlignment="Center"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <!--<UserControl.DataContext>
        <local:ucBarViewModel ItemsCount="13" SeriesCount="1" />
    </UserControl.DataContext>-->

    <UserControl.Resources>
        <Style TargetType="charting:VerticalAxisLabels2D">
            <Setter Property="FontFamily" Value="Arial Black"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="14"/>
        </Style>

        <Style x:Key="ItemLabelStyle" TargetType="TextBlock">
            <Setter Property="Foreground" Value="Red" />
            <Setter Property="FontSize" Value="14" />
        </Style>

        <Style x:Key="SeriesItemLabelStyle" TargetType="telerik:SeriesItemLabel">
            <Setter Property="FontFamily" Value="Arial Black"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="14"/>
            <Setter Property="Foreground" Value="White"/>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White">
        <chart:RadChart x:Name="RadChart1" dragDrop:RadDragAndDropManager.AllowDrop="True" >
            
            <chart:RadChart.DefaultView>
                <charting:ChartDefaultView ChartLegendPosition="Bottom">
                    <charting:ChartDefaultView.ChartLegend>
                        <charting:ChartLegend Name="ChartLegend" Visibility="Collapsed" />
                    </charting:ChartDefaultView.ChartLegend>

                    <charting:ChartDefaultView.ChartArea>
                        <charting:ChartArea LabelFormatBehavior="None" LegendName="ChartLegend" ItemWidthPercent="50" NoDataString="请查询">
                            <charting:ChartArea.AxisY>
                                <charting:AxisY AutoRange="True" MinValue="0" MaxValue="60" Step="10"
                                                AxisLabelsVisibility="Collapsed" IsInverse="False" LabelRotationAngle="0" 
                                                MajorGridLinesVisibility="Collapsed" MinorGridLinesVisibility="Collapsed"
                                                MajorTicksVisibility="Visible" MinorTicksVisibility="Visible"
                                                StripLinesVisibility="Collapsed"
                                                PlotAreaAxisVisibility="Collapsed" PlotAreaAxisLabelsVisibility="Collapsed"
                                                IsLogarithmic="False" IsZeroBased="True" ExtendDirection="Smart"
                                                />
                            </charting:ChartArea.AxisY>

                            <charting:ChartArea.AxisX>
                                <charting:AxisX  LayoutMode="Between" LabelStep="1" 
                                                />
                            </charting:ChartArea.AxisX>
                        </charting:ChartArea>
                    </charting:ChartDefaultView.ChartArea>
                </charting:ChartDefaultView>
            </chart:RadChart.DefaultView>
            
            <chart:RadChart.DefaultSeriesDefinition>
                <charting:HorizontalBarSeriesDefinition ShowItemLabels="True" ShowItemToolTips="True">
                    <charting:HorizontalBarSeriesDefinition.LabelSettings>
                        <charting:BarLabelSettings Distance="10" LabelDisplayMode="Outside" ShowConnectors="False" ShowZeroValueLabels="True">
                        </charting:BarLabelSettings>
                    </charting:HorizontalBarSeriesDefinition.LabelSettings>

                </charting:HorizontalBarSeriesDefinition>
            </chart:RadChart.DefaultSeriesDefinition>
            
        </chart:RadChart>
    </Grid>
</UserControl>
